<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" method="post">
                    <div class="widget-body">
                        <fieldset>
							<div class="widget-head am-cf">
                                <div class="widget-title am-fl"><?= $model['apply_mode']['text'] . '资料审查' ?></div>
                            </div>
                            <?php if($model['apply_mode']['value'] <> 30):?>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">营业执照</label>
                                <div class="am-u-sm-9">
                                    <div class="apply-img">
                                        <a href="<?= $model['details']['license_copy']['url'] ?>" target="_blank">
                                            <img src="<?= $model['details']['license_copy']['url'] ?>" />
                                        </a>
                                    </div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">类型</label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="apply[details][subject_type]" value="<?= $model['details']['subject_type']?>" data-am-ucheck <?= $model['details']['subject_type']=='SUBJECT_TYPE_INDIVIDUAL' ? 'checked' : '' ?>> 个体
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="apply[details][subject_type]" value="<?= $model['details']['subject_type']?>" data-am-ucheck <?= $model['details']['subject_type']=='SUBJECT_TYPE_INSTITUTIONS' ? 'checked' : '' ?>> 公司
                                    </label>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">名称</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['merchant_name'] ?>"
                                     name="apply[details][merchant_name]" required>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">统一社会信用代码</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['license_number'] ?>" 
                                     name="apply[details][license_number]" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">身份证</label>
                                <div class="am-u-sm-9">
                                    <div class="apply-img">
                                        <a href="<?= $model['details']['id_card_copy']['url'] ?>" target="_blank">
                                            <img src="<?= $model['details']['id_card_copy']['url'] ?>" />
                                        </a>
                                    </div>
                                    <div class="apply-img">
                                        <a href="<?= $model['details']['id_card_national']['url'] ?>" target="_blank">
                                            <img src="<?= $model['details']['id_card_national']['url'] ?>" />
                                        </a>
                                    </div>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">姓名</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['id_card_name'] ?>" 
                                     name="apply[details][id_card_name]" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">身份证号</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['id_card_number'] ?>" 
                                     name="apply[details][id_card_number]" required>
                                </div>
                            </div>
                            <?php if($model['apply_mode']['value'] == 20):?>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">特殊资质</label>
                                <div class="am-u-sm-9">
                                    <div class="apply-img">
                                        <a href="<?= $model['details']['qualifications']['url'] ?>" target="_blank">
                                            <img src="<?= $model['details']['qualifications']['url'] ?>" />
                                        </a>
                                    </div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">开户银行</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['bank_name'] ?>" 
                                     name="apply[details][bank_name]" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">银行账号</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['account_number'] ?>" 
                                     name="apply[details][account_number]" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">商户号</label>
                                <div class="am-u-sm-9">
                                    <input type="number" class="tpl-form-input" value="<?= $model['mchid'] ?>" 
                                     name="apply[mchid]">
                                     <small>审核通过时此项必填</small>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">商户简称</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['merchant_shortname'] ?>" 
                                     name="apply[merchant_shortname]" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">小程序APP_ID</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['app_id'] ?>" disabled>
                                </div>
                            </div>
                            <?php endif;?>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">联系电话</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['mobile_phone'] ?>" 
                                     name="apply[details][mobile_phone]" required>
                                </div>
                            </div>
                            <?php if($model['apply_mode']['value'] == 10 OR $model['apply_mode']['value'] == 50):?>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">微信号</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['legal_persona_wechat'] ?>" 
                                     name="apply[details][legal_persona_wechat]" required>
                                </div>
                            </div>
                            <?php endif;?>
                            <?php else:?>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">级别</label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" data-am-ucheck <?= $model['agent_mode']['value'] == 10?'checked':'' ?> disabled> 县区
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" data-am-ucheck <?= $model['agent_mode']['value'] == 20?'checked':'' ?> disabled> 市级
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" data-am-ucheck <?= $model['agent_mode']['value'] == 30?'checked':'' ?> disabled> 省级
                                    </label>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">姓名</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['id_card_name'] ?>" disabled>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">电话</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['details']['mobile_phone'] ?>" disabled>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">区域</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" value="<?= $model['province'] . $model['city'] . $model['district'] ?>" disabled>
                                </div>
                            </div>
                            <?php endif;?>
							<div class="widget-head am-cf">
                                <div class="widget-title am-fl">执行操作</div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">驳回原因</label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" name="apply[reject]" value="<?= $model['reject'] ?>"
									<?= $model['apply_status']['value']!=10? 'disabled':'' ?>>
                                </div>
                            </div>
							<div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label">操作类型类型</label>
                                <div class="am-u-sm-9">
                                    <label class="am-radio-inline">
                                        <input type="radio" name="apply[apply_status]" value="10" 
                                        <?= $model['apply_status']['value']==10 ? 'checked':'' ?> 
                                        <?= $model['apply_status']['value']==10 ? 'data-am-ucheck':'disabled' ?>> 
                                        保存
                                    </label>
                                    <?php if($model['apply_mode']['value'] == 10 OR $model['apply_mode']['value'] == 50):?>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="apply[apply_status]" value="20" 
                                        <?= $model['apply_status']['value']==20 ? 'checked':'' ?> 
                                        <?= $model['apply_status']['value']==10 ? 'data-am-ucheck':'disabled' ?>> 
                                        提交审核
                                    </label>
                                    <label class="am-radio-inline">
                                        <input type="radio" <?= $model['apply_status']['value']==30 ? 'checked':'' ?> disabled> 审核成功
                                    </label>
                                    <?php else:?>
                                    <label class="am-radio-inline">
                                        <input type="radio" name="apply[apply_status]" value="30" 
                                        <?= $model['apply_status']['value']==30 ? 'checked':'' ?> 
                                        <?= $model['apply_status']['value']==10 ? 'data-am-ucheck':'disabled' ?>> 
                                        审核成功
                                    </label>
                                    <?php endif;?>
									<label class="am-radio-inline">
                                        <input type="radio" name="apply[apply_status]" value="40" 
                                        <?= $model['apply_status']['value']==40 ? 'checked':'' ?> 
                                        <?= $model['apply_status']['value']==10 ? 'data-am-ucheck':'disabled' ?>> 
                                        资料驳回
                                    </label>
                                </div>
                            </div>
                            <?php if($model['apply_status']['value'] == 10):?>
                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>
                            <?php endif;?>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


<script>
    $(function () {

        $('#my-form').formPost();

    });
</script>
